package com.czwj.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.czwj.dao.CapitalApplyMapper;
import com.czwj.entities.CapitalApply;
import com.czwj.service.CapitalApplyService;

@Service
public class CapitalApplyServiceImpl implements CapitalApplyService {
	@Resource
	CapitalApplyMapper mapper;
	@Override
	public List<CapitalApply> searchbylevel3(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return this.mapper.searchbylevel3(map);
	}

	@Override
	public int countbylevel3(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return this.mapper.countbylevel3(map);
	}

	@Override
	public int update(CapitalApply capitalApply) {
		// TODO Auto-generated method stub
		return this.mapper.updateByPrimaryKeySelective(capitalApply);
	}

	@Override
	public int insert(CapitalApply capitalApply) {
		// TODO Auto-generated method stub
		return this.mapper.insert(capitalApply);
	}

	@Override
	public int updateStatus(int id) {
		// TODO Auto-generated method stub
		return this.mapper.updateStatus(id);
	}

	@Override
	public CapitalApply selectByPrimaryKey(int id) {
		// TODO Auto-generated method stub
		return this.mapper.selectByPrimaryKey(id);
	}

	@Override
	public List<CapitalApply> searchReviewedLevel1(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return this.mapper.searchReviewedLevel1(map);
	}

	@Override
	public int countReviewedLevel1(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return this.mapper.countReviewedLevel1(map);
	}

	@Override
	public List<CapitalApply> searchReviewedLevel2(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return this.mapper.searchReviewedLevel2(map);
	}

	@Override
	public int countReviewedLevel2(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return this.mapper.countReviewedLevel2(map);
	}

	@Override
	public List<CapitalApply> searchbylevel1(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return this.mapper.searchbylevel1(map);
	}

	@Override
	public int countbylevel1(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return this.mapper.countbylevel1(map);
	}

	@Override
	public List<CapitalApply> searchbylevel2(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return this.mapper.searchbylevel2(map);
	}

	@Override
	public int countbylevel2(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return this.mapper.countbylevel2(map);
	}

	@Transactional
	@Override
	public int remove(int id) {
		// TODO Auto-generated method stub
		int count=0;
		CapitalApply capitalApply = this.mapper.selectByPrimaryKey(id);
		count+= this.mapper.deleteByPrimaryKey(id);
		return count;
	}

	@Override
	public List<CapitalApply> getcapital(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return this.mapper.getcapital(map);
	}

	/** 
	* 
	* @param map
	* @return
	* @see com.czwj.service.CapitalApplyService#searchbyprojectitem(java.util.Map)
	*/
	@Override
	public List<CapitalApply> searchbyprojectitem(Map<String,Object> map){
		// TODO Auto-generated method stub
		return this.mapper.searchbyprojectitem(map);
	}
}
